'''集合的相关操作'''

"""可以是不同类型，无序,不能重复，
    作用：去重，以及进行关系测试
"""
A= {"宋江","吴用","卢俊义","林冲","关胜","武松"}
B= {"关胜","林冲","宋江","武松","张飞","燕青","小李"}

#既是A也是B的元素
print(A.intersection(B))

#是B但不是A的元素有
print(B.difference( A))

#是A但B没有的元素
print(A.difference(B))

#林冲是经理吗
print("林冲" in A)

#身兼一职的有
print(A.symmetric_difference(B))

#A和B一共有那些
print(A.union(B))